package com.xbongbong.paas.pojo.dto;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.pojo.FieldAttrEntityForImport;
import com.xbongbong.paas.pojo.imports.CellTitlePojo;
import com.xbongbong.paas.pojo.imports.CellValuePojo;
import com.xbongbong.paas.pojo.imports.RowGroupPojo;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * @author 梁鲁江
 * @version v1.0
 * @date 2019/9/18 16:20
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ImportMessageFormDataDTO extends BaseDTO {
    private static final long serialVersionUID = 629195063662403103L;
    ImportFormDataDTO importFormDataDTO;
    Integer totalRowNum;
    /**
     *
     */
    List<RowGroupPojo> rowGroupPojoList;
    List<CellTitlePojo> titlePojoLis;
    List<FieldAttrEntityForImport> fieldAttrEntityForImportList;
    JSONArray jsonArray;
//    ImportOtherParamsDTO importOtherParamsDTO;
    /**
     * 总组数
     */
    private   Integer totalSize;

    /**
     * 查重redis建值
     */
    private String checkRepeatKey;
    @Getter
    @Setter
    @ToString
    public static class RowGroupPojo   {
        /**
         * 分组的标志 一般为表单的流水号
         */
        private String groupTagValue;
        /**
         * 同一个分组的每一行的数据
         */
        private List<List<CellValuePojo>> rowValueList;

        /**
         *
         * 数据id，用于覆盖导入
         */
        private Long dataId;

        public RowGroupPojo() {
        }
    }
    @Getter
    @Setter
    @ToString
    public static class CellTitlePojo  extends com.xbongbong.paas.pojo.imports.CellTitlePojo {
    }
    @Getter
    @Setter
    @ToString
    public static class FieldAttrEntityForImport  extends com.xbongbong.paas.pojo.FieldAttrEntityForImport {
    }
    @Getter
    @Setter
    @ToString
    public static class CellValuePojo  extends com.xbongbong.paas.pojo.imports.CellValuePojo {
    }
}
